using System;
using System.Collections.Generic;
using System.Text;

namespace NBusiness.Query.SqlServer
{
    public class SqlEqual : SqlBoolean
    {
        public bool Not
        {
            get { return Operator == SqlBooleanOperator.NotEqual; }
            set { Operator = (value ? SqlBooleanOperator.NotEqual : SqlBooleanOperator.Equal); }
        }
                
        public SqlEqual()
            : base(SqlBooleanOperator.Equal)
        { }
        public SqlEqual(IEvaluatable left, IEvaluatable right)
            : this(left, right, false)
        { }
        public SqlEqual(IEvaluatable left, IEvaluatable right, bool not)
            : base(left, (not ? SqlBooleanOperator.NotEqual : SqlBooleanOperator.Equal), right)
        { }
    }
}
